perm filename TEST.TEX[TEX,DEK]2 blob
sn#424398 filedate 1979-03-10 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 \input basic % Delete this line if you merge BLAISE output with another .TEX file
C00007 ENDMK
Cā;
\input basic % Delete this line if you merge BLAISE output with another .TEX file
\input algol % This file defines the neccesary macros and font \:t
\hsize 200pt
{\ragged1000000 \jpar10000 \setcount7\Tbb\1 % Beginning BLAISE output:
\2\40\ $\{$ program 9.1 -- frequency count of letters in input file $\}$
\3\5\&{program} $\\{fcount}(\\{input},\45\\{output})$\1;
\3\2\1\&{var} $\\{ch}\mathrel:\\{char}$;
\2$\\{count}\mathrel:\mathop{\&{array}}[\.{'a'}\mathrel{\!.\,.\!}\.{'z'}]
\mathop{\&{of}}\\{integer}$;
\2$\\{letter}\mathrel:\mathop{\&{set}}
\mathop{\&{of}}\.{'a'}\mathrel{\!.\,.\!}\.{'z'}$;
\3\2\&{begin} \0$\\{letter}\mathrel:= [\.{'a'}\mathrel{\!.\,.\!}\.{'z'}]$;
\2\1\&{for} $\\{ch}\mathrel:= \.{'a'}\mathrel{\&{to}}\.{'z'}$\&{do}
\0$\\{count}[\\{ch}]\mathrel:=0$\3;
\2\1\&{while} $\mathop{\&{not}}\\{eof}$ \&{do}
\2\&{begin} \0\1\&{while} $\mathop{\&{not}}\\{eoln}$ \&{do}
\2\&{begin} \0$\\{read}(\\{ch})$;
\0$\\{write}(\\{ch})$;
\2\1\&{if} $\\{ch}\mathrel{\&{in}}\\{letter}$ \&{then}
\0$\\{count}[\\{ch}]\mathrel:=\\{count}[\\{ch}]+1$\3\2\&{end}\3;
\2$\\{writeln}$;
\0$\\{readln}$\2\&{end}\3\2\&{end}.
\3\5\1\&{type} $\\{alfa}=\mathop{\&{packed}}\mathop{\&{array}}[1\mathrel{\!.\,.\!}
10]\mathop{\&{of}}\\{char}$;\40\ $\{$ page 46 $\}$
\2$\\{status}=(\\{married},\45\\{widowed},\45\\{divorced},\45\\{single})$;
\2$\\{date}=\null$\1\2\&{record} $\\{mo}\mathrel:(\\{jan},\45\\{feb},\45
\\{mar},\45\\{apr},\45\\{may},\45\\{jun},\45\\{july},\45\\{aug},\45
\\{sept},\45\\{oct},\45\\{nov},\45\\{dec})$;
\2$\\{day}\mathrel:1\mathrel{\!.\,.\!}31$;
\2$\\{year}\mathrel:\\{integer}$\2\&{end}$\null\3$;
\2$\\{person}=\null$\1\2\&{record} $\\{ss}\mathrel:\\{integer}$;
\2$\\{name}\mathrel:\null$\1\2\&{record}
$\\{first},\45\\{last}\mathrel:\\{alfa}$\2\&{end}$\null\3$;
\2$\\{sex}\mathrel:(\\{male},\\{female})$;
\2$\\{birth}\mathrel:\\{date}$;
\2$\\{depdts}\mathrel:\\{integer}$;
\2\1\&{case} $\\{ms}\mathrel:\\{status}$ \&{of} \2\1$\\{married},\0\\{widowed}
\mathrel:\null$($\\{mdate}\mathrel:\\{date}$)\3;
\2\1$\\{divorced}\mathrel:\null$($\\{ddate}\mathrel:\\{date}$;
\2$\\{first}\mathrel:\\{Boolean}$)\3;
\2\1$\\{single}\mathrel:\null$($\\{indepdt}\mathrel:\\{Boolean}$)\3\3\2\&{end}$\null
$\3;\40\ $\{$ person $\}$
\5\1\&{with} $\\{p},\45\\{name},\45\\{birth}$ \&{do}
\2\&{begin} \0$\\{last}\mathrel:=\.{'woodyard\ \ '}$;
\0$\\{first}\mathrel:=\.{'edward\ \ \ \ '}$;
\0$\\{ss}\mathrel:=845680539$;
\0$\\{sex}\mathrel:=\\{male}$;
\0$\\{mo}\mathrel:=\\{aug}$;
\0$\\{day}\mathrel:=30$;
\0$\\{year}\mathrel:=1941$;
\0$\\{depdts}\mathrel:=1$;
\0$\\{ms}\mathrel:= \\{single}$;
\0$\\{indepdt}\mathrel:=\\{true}$\2\&{end}\3\40\ $\{$ with $\}$
\par} % end of BLAISE output